/*
Blurry Savant preliminary library

Author : Pedro Bittencourt
Date : 06/12/2009
Last Review in:  by:
*/

/* Constants definitions */
#define NUMOFGROUPS 7
#define NUMOFRULES 169
#define ALLVALUES 13

/* Macros */
#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
#define QUANT(g,input) ((int) round(g*input))

Out* createOutPut();

int MOMDefuzz(Out* out);
void printMatrix(int* mat,int x,int y);
double checkPert(int input,int group);
int fuzzyInf(double err,double derr, double gx, double gy, int* rules,int ( * defuzzy ) ( Out * ));